import bgAnimation from './bizComp/bgAnimation' // 登录界面背景图动画
import peerReview from './bizComp/peerReview' // 生生互评

import supervisoryEval from './bizComp/supervisoryEval' // 主管监评
import studentInfo from './bizComp/studentInfo' // 学生信息
import classOverallEval from './bizComp/classOverallEval' // 班级整体评价
import teacherEval from './bizComp/teacherEval' // 教师主评
import platformEval from './bizComp/platformEval' // 平台测评
import expertJointEval from './bizComp/expertJointEval' // 专家联评

import studentScore from './bizComp/studentScore'  
import allStudentScore from './bizComp/allStudentScore'  
import compareRecord from './bizComp/compareRecord'  

const components = {
  bgAnimation,
  peerReview,
  supervisoryEval,
  studentInfo,
  classOverallEval,
  teacherEval,
  platformEval,
  expertJointEval,
  studentScore,
  allStudentScore,
  compareRecord
};

const install = (Vue = {}) => {
  if (install.installed) return;
  Object.keys(components).forEach(component => {
    Vue.component(components[component].name, components[component]);
  });

  install.installed = true;
};

install.installed = false;

if (typeof window !== "undefined" && window.Vue) {
  install(window.Vue);
  install.installed = true;
}

const Vcomp = {
  ...components,
  install
};


export default Vcomp
